<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        // 快速创建一个成功的实例   Promise.resolve()
         // 快速创建一个失败的实例   Promise.reject()

        const p = Promise.resolve(1) ;
        console.log(p);


        p.then(data => {
            console.log(data);
        })

        console.log(2);

    </script>
    
</body>
</html>